#ifndef __CAMERA_OGL__
#define __CAMERA_OGL__

#include <iostream>
#include <glm\glm.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

using namespace glm;


class Camera
{

   const double Pi = 3.14159265358979323846264338327950288;
   vec2 mouse;
   vec3 eye, center, up; //lookAt parameters, only used to initialize camera
   vec3 angle, position; //viewer position and angle
   float fov, zNear, zFar;
   float width, height;
   mat4 transform, view, projection; //transform - world rotate and translation, used here to control the 'viewer'

   bool moveDir[6]; //movement directions - coupled with enum Direction

   mat4 getRotate (void);

   void movement ();
   void mouseCamMov ();
   void fowardMov (void);
   void backwardMov (void);
   void strateLeftMov (void);
   void strateRightMov (void);
   void flyUpMov (void);
   void flyDownMov (void);
public:
   Camera (const float &w, const float &h);

   static const enum Direction { FWD, BWD, STR, STL, UP, DOWN };

   void update (void);
   void setDimension (const float &w, const float &h);
   void setEye (const vec3 &eyeVec);
   void setCenter (const vec3 &centerVec);
   void setUp (const vec3 &upVec);
   void setTransform (const mat4 &world);
   void setMouse (const vec2 &mouse);
   void setMovDir (const int &d);
   void unSetMovDir (const int &d);
   const vec3 &getEye (void);
   const vec3 &getCenter (void);
   const vec3 &getUp (void);
   const vec3 &getAngle (void);
   const vec3 &getPosition (void);
   const mat4 &getView (void);
   const mat4 &getProjection (void);
   const mat4 &getTransform (void);
   ~Camera ();
};

#endif